import React, { Component } from 'react'

export class NavBarTwo extends Component {
  constructor() {
    super()
    this.state = {
      message: '我是标题内容'
    }
  }
  render() {
    const { leftSlot, centerSlot, rightSlot } = this.props
    const { message } = this.state
    return (
      <div className="nav-bar">
        <div className="left">{ leftSlot }</div>
        <div className="center">{ centerSlot(message) }</div>
        <div className="right">{ rightSlot }</div>
      </div>
    )
  }
}

export default NavBarTwo